package Solutions

import "sort"

func arrangeCoins(n int) int {
	k := sort.Search(65536, func(i int) bool {
		return (i+1)*i/2 > n
	})
	return k - 1
}
